async function fetchLocations({ keyword = '', type = '', sortby = 'heat' } = {}) {
  // 发送请求到后端
  const url = new URL('http://localhost:8080/api/locations');
  
  // 构建查询参数
  const params = new URLSearchParams({
    keyword: keyword,
    type: type,
    sortby: sortby,
    limit: 10,  // 可以根据需要调整
    offset: 0   // 分页，初始为0
  });

  url.search = params.toString();

  // 发送GET请求
  const response = await fetch(url);
  const data = await response.json();

  return data;  // 返回后端的响应数据
}
